Skip to content

feat(autocomplete): support autofocus#6921

Merged
dhayab merged 2 commits intomasterfrom
feat/autocomplete-autofocus
Mar 12, 2026
Merged

feat(autocomplete): support autofocus#6921
dhayab merged 2 commits intomasterfrom
feat/autocomplete-autofocus

Conversation

@dhayab
Copy link
Member

@dhayab dhayab commented Mar 12, 2026

Summary

This PR adds an autofocus option to the autocomplete widget (IS.js) and autoFocus prop (React) that focuses the input and opens the panel on mount.

"test:e2e": "playwright test",
"test:e2e:saucelabs": "playwright test",
"watch:es": "yarn --silent build:es:base --watch"
"watch:es": "BABEL_ENV=es,rollup BUILD_FORMAT=esm rollup -c rollup.config.mjs --watch"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the PR but won't hurt, it fixes watch:es since build:es:base doesn't exist anymore. Let me know if you'd rather I do this in its own PR.

@dhayab dhayab requested review from a team, FabienMotte and aymeric-giraudet and removed request for a team March 12, 2026 15:59
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 12, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7f759bb:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

Copy link
Member

@sarahdayan sarahdayan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the bundle size is fixed.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that the js prop is called autofocus and the react one autoFocus

@dhayab dhayab merged commit 1d2156a into master Mar 12, 2026
14 checks passed
@dhayab dhayab deleted the feat/autocomplete-autofocus branch March 12, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants